import * as tslib_1 from "tslib";
import { Injectable } from '@angular/core';
import { ViewModel, NgCommand } from '@farris/devkit';
import { Observable } from 'rxjs';
var ɵ0 = { type: 'string' };
var BxmxComponentViewmodel = /** @class */ (function (_super) {
    tslib_1.__extends(BxmxComponentViewmodel, _super);
    function BxmxComponentViewmodel() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.bindingPath = '/bxmxs';
        _this.dom = {
            "dataGrid_bxmx": {
                "type": "DataGrid",
                "resourceId": "dataGrid_bxmx",
                "visible": {
                    "useQuote": false,
                    "isExpression": false,
                    "value": true
                },
                "id": "dataGrid_bxmx",
                "size": {},
                "readonly": {
                    "useQuote": false,
                    "isExpression": false,
                    "value": false
                },
                "fields": [
                    {
                        "type": "GridField",
                        "resourceId": "billDetailDate_f2ab86b9_9jnd",
                        "visible": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": true
                        },
                        "id": "billDetailDate_f2ab86b9_9jnd",
                        "size": {
                            "width": 120
                        },
                        "readonly": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": false
                        },
                        "binding": {
                            "type": "Form",
                            "path": "billDetailDate",
                            "isExpression": false,
                            "value": "billDetailDate"
                        },
                        "dataField": "billDetailDate",
                        "dataType": "datetime",
                        "multiLanguage": false,
                        "caption": "费用日期",
                        "editor": {
                            "type": "EditableField",
                            "disable": false,
                            "editable": true,
                            "dateRange": false,
                            "showTime": true,
                            "title": "日期选择",
                            "showType": 1,
                            "locale": "zh-cn",
                            "dateFormat": "yyyy-MM-dd HH:mm:ss",
                            "placeHolder": "",
                            "linkedLabelEnabled": false,
                            "disableDates": [],
                            "returnType": "Date",
                            "useDefault": false,
                            "showWeekNumbers": false,
                            "dateRangeDatesDelimiter": "~",
                            "shortcuts": [],
                            "holdPlace": false,
                            "returnFormat": "yyyy-MM-dd HH:mm:ss",
                            "titleWidth": null,
                            "localization": false,
                            "isTextArea": true,
                            "resourceId": "billDetailDate_f2ab86b9_s2x9",
                            "defaultI18nValue": "日期选择",
                            "visible": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": true
                            },
                            "id": "billDetailDate_f2ab86b9_s2x9",
                            "size": {},
                            "readonly": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": false
                            },
                            "binding": {
                                "type": "Form",
                                "path": "billDetailDate",
                                "isExpression": false,
                                "value": "billDetailDate"
                            }
                        },
                        "draggable": false,
                        "frozen": "none",
                        "sortable": true,
                        "resizeable": true,
                        "aggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "groupAggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "linkedLabelEnabled": false,
                        "updateOn": "blur",
                        "formatter": {
                            "type": "date",
                            "dateFormat": "yyyy-MM-dd HH:mm:ss"
                        }
                    },
                    {
                        "type": "GridField",
                        "resourceId": "billDetailAmount_37cf3548_fopg",
                        "visible": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": true
                        },
                        "id": "billDetailAmount_37cf3548_fopg",
                        "size": {
                            "width": 120
                        },
                        "readonly": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": false
                        },
                        "binding": {
                            "type": "Form",
                            "path": "billDetailAmount",
                            "isExpression": false,
                            "value": "billDetailAmount"
                        },
                        "dataField": "billDetailAmount",
                        "dataType": "number",
                        "multiLanguage": false,
                        "caption": "报销金额",
                        "editor": {
                            "type": "FarrisNumberSpinner",
                            "isTextArea": true,
                            "resourceId": "billDetailAmount_37cf3548_xfyq",
                            "defaultI18nValue": "数值框",
                            "visible": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": true
                            },
                            "id": "billDetailAmount_37cf3548_xfyq",
                            "size": {},
                            "readonly": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": false
                            },
                            "binding": {
                                "type": "Form",
                                "path": "billDetailAmount",
                                "isExpression": false,
                                "value": "billDetailAmount"
                            },
                            "disable": false,
                            "step": 1,
                            "useThousands": true,
                            "textAlign": "left",
                            "precision": 2
                        },
                        "draggable": false,
                        "frozen": "none",
                        "sortable": true,
                        "resizeable": true,
                        "aggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "groupAggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "linkedLabelEnabled": false,
                        "updateOn": "blur",
                        "formatter": {
                            "type": "number",
                            "precision": 2,
                            "thousand": ",",
                            "decimal": "."
                        }
                    },
                    {
                        "type": "GridField",
                        "resourceId": "billDetailNote_77ece91e_6fzv",
                        "visible": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": true
                        },
                        "id": "billDetailNote_77ece91e_6fzv",
                        "size": {
                            "width": 120
                        },
                        "readonly": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": false
                        },
                        "binding": {
                            "type": "Form",
                            "path": "billDetailNote",
                            "isExpression": false,
                            "value": "billDetailNote"
                        },
                        "dataField": "billDetailNote",
                        "dataType": "string",
                        "multiLanguage": false,
                        "caption": "费用说明",
                        "editor": {
                            "type": "MultiTextBox",
                            "isTextArea": true,
                            "resourceId": "billDetailNote_77ece91e_4xcc",
                            "defaultI18nValue": "多行文本框",
                            "visible": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": true
                            },
                            "id": "billDetailNote_77ece91e_4xcc",
                            "size": {},
                            "readonly": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": false
                            },
                            "binding": {
                                "type": "Form",
                                "path": "billDetailNote",
                                "isExpression": false,
                                "value": "billDetailNote"
                            },
                            "disable": false,
                            "maxLength": 0
                        },
                        "draggable": false,
                        "frozen": "none",
                        "sortable": true,
                        "resizeable": true,
                        "aggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "groupAggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "linkedLabelEnabled": false,
                        "updateOn": "blur",
                        "formatter": {
                            "type": "none"
                        }
                    },
                    {
                        "type": "GridField",
                        "resourceId": "invoiceNO_6ccc8cdd_pnf6",
                        "visible": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": true
                        },
                        "id": "invoiceNO_6ccc8cdd_pnf6",
                        "size": {
                            "width": 120
                        },
                        "readonly": {
                            "useQuote": false,
                            "isExpression": false,
                            "value": false
                        },
                        "binding": {
                            "type": "Form",
                            "path": "invoiceNO",
                            "isExpression": false,
                            "value": "invoiceNO"
                        },
                        "dataField": "invoiceNO",
                        "dataType": "string",
                        "multiLanguage": false,
                        "caption": "发票号码",
                        "editor": {
                            "type": "TextBox",
                            "isTextArea": true,
                            "resourceId": "invoiceNO_6ccc8cdd_6gxr",
                            "defaultI18nValue": "文本",
                            "visible": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": true
                            },
                            "id": "invoiceNO_6ccc8cdd_6gxr",
                            "size": {},
                            "readonly": {
                                "useQuote": false,
                                "isExpression": false,
                                "value": false
                            },
                            "binding": {
                                "type": "Form",
                                "path": "invoiceNO",
                                "isExpression": false,
                                "value": "invoiceNO"
                            },
                            "disable": false,
                            "maxLength": 36,
                            "isPassword": false,
                            "enableViewPassword": false
                        },
                        "draggable": false,
                        "frozen": "none",
                        "sortable": true,
                        "resizeable": true,
                        "aggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "groupAggregate": {
                            "type": "none",
                            "formatter": {
                                "type": "none"
                            }
                        },
                        "linkedLabelEnabled": false,
                        "updateOn": "blur",
                        "formatter": {
                            "type": "none"
                        }
                    }
                ],
                "multiSelect": false,
                "editable": "viewModel.stateMachine['editable']",
                "showLineNumber": false,
                "lineNumberTitle": "#",
                "groupTotalText": "Total",
                "filterable": false,
                "groupable": false,
                "rowClass": ""
            }
        };
        return _this;
    }
    BxmxComponentViewmodel.prototype.bxmxAddItem1 = function (commandParam) { return; };
    BxmxComponentViewmodel.prototype.bxmxRemoveItem1 = function (commandParam) { return; };
    tslib_1.__decorate([
        NgCommand({
            name: 'bxmxAddItem1',
            params: {}
        }),
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", [Object]),
        tslib_1.__metadata("design:returntype", Observable)
    ], BxmxComponentViewmodel.prototype, "bxmxAddItem1", null);
    tslib_1.__decorate([
        NgCommand({
            name: 'bxmxRemoveItem1',
            params: {
                id: '{DATA~/#{bxmx-component}/bxmxs/id}'
            },
            paramDescriptions: {
                id: ɵ0
            }
        }),
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", [Object]),
        tslib_1.__metadata("design:returntype", Observable)
    ], BxmxComponentViewmodel.prototype, "bxmxRemoveItem1", null);
    BxmxComponentViewmodel = tslib_1.__decorate([
        Injectable()
    ], BxmxComponentViewmodel);
    return BxmxComponentViewmodel;
}(ViewModel));
export { BxmxComponentViewmodel };
export { ɵ0 };
